package com.yangguang.huahui.mvp.presenter;

import com.yangguang.huahui.entity.Attention;
import com.yangguang.huahui.mvp.model.CommonModel;
import com.yangguang.huahui.mvp.view.ChangePinView;
import com.yangguang.huahui.rx.RxManager;
import com.yangguang.huahui.rx.RxSubscriber;

/**
 * Created by Administrator on 2017/3/10.
 */

public class ChangePinPresenter extends BasePresenter<ChangePinView>{
    CommonModel model;

    public ChangePinPresenter() {
        model = new CommonModel();
    }
    public void getAttention(){
        mSubscription = RxManager.getInstance().doSubscribe(model.getTabs(), new RxSubscriber<Attention>(false) {
            @Override
            protected void _onNext(Attention attention) {
                mView.onSuccess(attention);
            }

            @Override
            protected void _onError() {
                mView.onError();
            }
        });
    }
}
